using System;
using System.Runtime.Serialization;
using ns18;

namespace Newtonsoft.Json
{
	[Serializable]
	public class JsonReaderException : JsonException
	{
		public int LineNumber { get; private set; }

		public int LinePosition { get; private set; }

		public string Path { get; private set; }

		public JsonReaderException()
		{
		}

		public JsonReaderException(string message)
			: base(message)
		{
		}

		public JsonReaderException(string message, Exception innerException)
			: base(message, innerException)
		{
		}

		public JsonReaderException(SerializationInfo info, StreamingContext context)
			: base(info, context)
		{
		}

		internal JsonReaderException(string message, Exception innerException, string path, int lineNumber, int linePosition)
			: base(message, innerException)
		{
			Path = path;
			LineNumber = lineNumber;
			LinePosition = linePosition;
		}

		internal static JsonReaderException smethod_1(JsonReader jsonReader_0, string string_0)
		{
			return smethod_2(jsonReader_0, string_0, null);
		}

		internal static JsonReaderException smethod_2(JsonReader jsonReader_0, string string_0, Exception exception_0)
		{
			return smethod_3(jsonReader_0 as IJsonLineInfo, jsonReader_0.String_0, string_0, exception_0);
		}

		internal static JsonReaderException smethod_3(IJsonLineInfo ijsonLineInfo_0, string string_0, string string_1, Exception exception_0)
		{
			string_1 = Struct25.smethod_2(ijsonLineInfo_0, string_0, string_1);
			int lineNumber;
			int linePosition;
			if (ijsonLineInfo_0 != null && ijsonLineInfo_0.HasLineInfo())
			{
				lineNumber = ijsonLineInfo_0.LineNumber;
				linePosition = ijsonLineInfo_0.LinePosition;
			}
			else
			{
				lineNumber = 0;
				linePosition = 0;
			}
			return new JsonReaderException(string_1, exception_0, string_0, lineNumber, linePosition);
		}
	}
}
